package com.example.thymeleaf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class ThymeleafApplication {

    @Value("${test.name}")
    private String testName;

    public static void main(String[] args) {
        SpringApplication.run(ThymeleafApplication.class, args);
    }

    @Bean
    public CommandLineRunner runner() {
        return (a) ->
            System.out.println(testName);
    }

}
